import { createApp } from "vue";
import "./style.css";
//SVG插件必须的配置
import "virtual:svg-icons-register";
import App from "./App.vue";
import router from "./router";
import echarts from "./utils/echarts";
import { createPinia } from "pinia";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import { i18n } from "@/locales/index";
import gloablComponent from "@/components/index";
import echartsComponent from "@/components/echarts/index.ts";
import ArcoVueIcon from "@arco-design/web-vue/es/icon"; // 引入arco图标
import "@arco-design/web-vue/dist/arco.css";
// 自定义指令
import globalDirectives from "./shared/index";
const app = createApp(App);
globalDirectives(app);
app.config.globalProperties.$echarts = echarts;
app.provide("$echarts", echarts);
// pinia持久化插件
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
app.use(gloablComponent);
app.use(echartsComponent);
app.use(ArcoVueIcon);
app.use(i18n);
app.use(pinia);
app.use(router);
app.mount("#app");
